/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package stateless;

import javax.ejb.Remote;
import java.util.ArrayList;
import java.sql.Date;

/**
 *
 * @author stan
 */
@Remote
public interface FoodMateEJBRemote {

    String Hello();

    String test();


    public boolean BanUser(int id);

    public boolean UnbanUser(int id);

    public static class Restaurant
    {
        public int Id;
        public String Name;
        public String Style;
        public String Location;
        public String Email;
        public String Picture;
        public String Description;
    };
    ArrayList<Restaurant> FindRestaurant(String style, String loc, String name);
    Restaurant FindRestaurant(int id);
    boolean AddRestaurant(Restaurant rst);
    boolean UpdateRestaurant(Restaurant rst);
    boolean DeleteRestaurant(int id);

    public static class ReserveInfo
    {
        public int Id;
        public int UserId;
        public int RestaurantId;
        public Date Date;
        public int Time;
        public String Memo;
        public int Host; //1 for userid is host, 0 otherwise
        public int Status;
    };

    ReserveInfo FindReserveInfo(int id);
    ArrayList<ReserveInfo> FindReserveInfoByUser(int usrid);
    ArrayList<ReserveInfo> FindReserveInfoByHost(int hostid);
    ArrayList<ReserveInfo> FindReserveInfoByRestaurant(int rstid);
    ArrayList<ReserveInfo> FindReserveInfoByRestaurantAndTime(int rstid, Date dat, int time);

    boolean AddReserveInfo(ReserveInfo rsv);
    boolean UpdateReserveInfo(ReserveInfo rsv);
    boolean DeleteReserveInfo(int id);

    public static class User
    {
        public int Id;
        public String Password;
        public String Name;
        public boolean Gender;
        public String Email;
        public String Picture;
        public String Description;
        public boolean Baned;
    };
    User FindUser(int id);
    boolean AddUser(User usr);
    boolean UpdateUser(User usr);
    boolean DeleteUser(int id);

    ArrayList<User> ListAllUser();

}
